A stacked Bar chart with chart.labels.above
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
window.onload = function ()
{
var bar = new RGraph.Bar({
id: 'cvs',
data: [[10,12,13],[45,43,26],[42,21,52],[4,3,5]],
options: {
labels: ['January','February','March','April'],
labelsAbove: true,
labelsAboveUnitsPre: '',
labelsAboveUnitsPost: '',
hmargin: 20,
hmarginGrouped: 2,
highlightFill: 'red',
grouping: 'stacked',
shadowOffsetx: 2,
shadowOffsety: 2,
shadowBlur: 2,
strokestyle: 'rgba(0,0,0,0)',
gutterLeft: 35,
textAccessible: true
}
}).draw();
};
</script>